@model List<Book>;
    <div>
        <a asp-action="Add">新增</a>
        <form asp-action="Index" method="get">
            <label><input name="key" placeholder="请输入关键词"></label>
            <input type="submit" value="查询">
        </form>
    </div>
    <table>
        <thead>
            <tr>
                <th>作者</th>
                <th>书名</th>
                <th>内容</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
          @foreach(var item in Model)
          {
               <tr>
                <td>@item.Author</td>
                <td>@item.Title</td>
                <td>@item.Content</td>
                <td>
                    <a asp-action="Edit" asp-route-id="@item.Id">修改</a>
                    <a asp-action="Delete" asp-route-id="@item.Id">删除</a>
                </td>
               </tr>
          }
        </tbody>
    </table>